home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / www / src / WWW / Daemon / Implementation / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-13  |  871 b   |  33 lines

  1. /*        Test Gateway Code
  2. **
  3. ** This code simulates a daemon program. The first argument is the
  4. ** document address, the second is teh keywords.
  5. */
  6. #include "HTUtils.h"
  7. #include <stdio.h>
  8.  
  9. #ifdef __STDC__
  10. extern int HTRetrieve(char * arg, char * keywords, int soc);    /* Handle one request */
  11. #else
  12. extern int HTRetrieve();    /* Handle one request */
  13. #endif
  14.  
  15. PUBLIC char HTClientHost[16];    /* Peer internet address */
  16.  
  17. /*    Program-Global Variables
  18. **    ------------------------
  19. */
  20.  
  21. PUBLIC int    WWW_TraceFlag=1;    /* Control flag for diagnostics */
  22. PUBLIC FILE * logfile = stderr;    /* Log file if any  */
  23. PUBLIC char * log_file_name = "/dev/tty";/* Log file name if any (WAIS code) */
  24.  
  25.  
  26. int main(int argc, char*argv[])
  27. {
  28.     int status;
  29.     if (TRACE) printf('Trace on\n");
  30.     status = HTRetrieve(argv[1], argv[2], 1);
  31.     printf("HTRetrieve returned %d\n", status);
  32.     
  33. } /* main */